<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 * @author   howe <howe1995@163.com>
 */
use Hyperf\Context\ApplicationContext;
use Psr\SimpleCache\CacheInterface;

return [
    'font_file' => '', // 自定义字体包路径， 不填使用默认值
    // 文字验证码
    'click_world' => [
        'backgrounds' => [],
    ],
    // 滑动验证码
    'block_puzzle' => [
        'backgrounds' => [], // 背景图片路径， 不填使用默认值
        'templates' => [], // 模板图
        'offset' => 10, // 容错偏移量
    ],
    // 水印
    'watermark' => [
        'fontsize' => 12,
        'color' => '#ffffff',
        'text' => '我的水印',
    ],
    'cache' => [
        'constructor' => function () {
            // 在构造函数中传入自已的配置
            return ApplicationContext::getContainer()->get(CacheInterface::class);
        },
        'method' => [
            'get' => 'get', // 获取
            'set' => 'set', // 设置
            'delete' => 'delete', // 删除
            'has' => 'has', // key是否存在
        ],
    ],
];
